package com.mdd.admin.validate.log;

import com.mdd.common.validator.annotation.IDMust;
import com.mdd.common.validator.annotation.IntegerContains;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import lombok.Data;
import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * 订单退款日志参数
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class OrderRefundLogParam implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface create{}
    public interface update{}
    public interface delete{}

    @IDMust(message = "id参数必传且需大于0", groups = {update.class, delete.class})
    private Long id;

    @NotNull(message = "sn参数缺失", groups = {create.class, update.class})
    @Length(max = 32, message = "sn参数不能超出32个字符", groups = {create.class, update.class})
    private String sn;

    @NotNull(message = "refundId参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "refundId参数值不能少于0", groups = {create.class, update.class})
    private Long refundId;

    @NotNull(message = "type参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "type参数值不能少于0", groups = {create.class, update.class})
    private Integer type;

    @NotNull(message = "operatorId参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "operatorId参数值不能少于0", groups = {create.class, update.class})
    private Integer operatorId;

    @NotNull(message = "refundStatus参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "refundStatus参数值不能少于0", groups = {create.class, update.class})
    private Integer refundStatus;

    @NotNull(message = "wechatRefundId参数缺失", groups = {create.class, update.class})
    @Length(max = 30, message = "wechatRefundId参数不能超出30个字符", groups = {create.class, update.class})
    private String wechatRefundId;

    private String refundMsg;

}
